EMT Practice Test

1. Question Content...


Question List

Question1: Read the table

The following SAS program is submitted:
proc freq data = sales;
<insert TABLES statement here>
run;
The following output is created by the FREQUENCY procedure:

Which TABLES statement(s) completed the program and produced the output?

Question2: Given the SAS data set WORK.THREE:

The following SAS program is submitted:

What is the result?

Question3: The following SAS program is submitted:

If the value for the variable Jobcode is: PILOT2, what is the value of the variable Description?

Question4: Which statement is true concerning the SAS automatic variable _ERROR_?

Question5: The following SAS program is submitted:
libname temp 'SAS-data-library';
data work.new;
set temp.jobs;
format newdate mmddyy10.;
qdate = qtr(newdate);
ddate = weekday(newdate);
run;
proc print data = work.new;
run;
The variable NEWDATE contains the SAS date value for April 15, 2000.
What output is produced if April 15, 2000 falls on a Saturday?

Question6: Scenario:
Continuing with the previous program (program27), add a PROC SORT step that satisfies the following criteria:
* Creates the output dataset results.output27b
* Sorts the observations by order.
* Removes duplicate values of the first occurrence found during the sort.
What is the value of Employee_ID for observation 98 inresults.output27b?

Question7: The contents of the raw data file CALENDAR are listed below:
--------10-------20-------30
01012000
The following SAS program is submitted:
data test;
infile 'calendar';
input @1 date mmddyy10.;
if date = '01012000'd then event = 'January 1st';
run;
Which one of the following is the value of the EVENT variable?

Question8: The SAS data set PETS is sorted by the variables TYPE and BREED.
The following SAS program is submitted:
proc print data = pets;
var type breed;
sum number;
run;
What is the result?

Question9: The following SAS program is submitted;
data combine;
country = 'Italy, Russia, ireland';
found = find(country, 'i');
run;
What is the value of the variable FOUND in the output data set?

Question10: Which one of the following SAS statements renames two variables?

Question11: The following SAS program is submitted:
data test;
set chemists;
jobcode = 'Chem2'
then description = 'Senior Chemist';
else description = 'Unknown';
run;
The value for the variable JOBCODE is:
JOBCODE
-------------
chem2
What is the value of the variable DESCRIPTION?

Question12: Given the data sets below:
WORK.EMP with variables:

WORK.NEWHIRE with variables:

The following SAS program is submitted:

The SAS data set WORK.EMP has 50 observations, and the data set WORK.NEWHIRE has 4 observations.
How many variables will the data set WORK.ALLEMP contain?

Question13: The following SAS program is submitted:
data work.totalsales;
set work.monthlysales(keep = year product sales);
retain monthsales {12} ;
array monthsales {12} ;
do i = 1 to 12;
monthsales{i} = sales;
end;
cnt + 1;
monthsales{cnt} = sales;
run;
The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations.
Which one of the following is the result of the above program?

Question14: The following SAS program is submitted:
data work.products;
Product_Number = 5461;
Item = '1001';
Item_Reference = Item'/'Product_Number;
run;
Which one of the following is the value of the variable ITEM_REFERENCE in the output data set?

Question15: The following SAS program is submitted:
data work.test;
set work.staff (keep = jansales febsales marsales);
array diff_sales{3} difsales1 - difsales3;
array monthly{3} jansales febsales marsales;
run;
What new variables are created?

Question16: The following SAS program is submitted:
data WORK.DATE_INFO;
Day="01" ;
Yr=1960 ;
X=mdy(Day,01,Yr) ;
run;
What is the value of the variable X?

Question17: What describes the SAS automatic _ERROR_ variable?

Question18: The following SAS program is submitted:

What is the value of the variable var1?

Question19: This question will ask you to provide a segment of missing code.
Given the SAS data set WORK.ONE:

The following SAS program is submitted:

The data set WORK.TWO is created, where Day would be the day of the month:

Which expression successfully completed the program and creates the variable Day?

Question20: Which of the following programs correctly invokes the DATA Step Debugger?

Question21: The following SAS program is submitted:
footnote1 'Sales Report for Last Month';
footnote2 'Selected Products Only';
footnote3 'All Regions';
footnote4 'All Figures in Thousands of Dollars'; proc print data = sasuser.shoes; footnote2 'All Products'; run; Which footnote(s) is/are displayed in the report?

Question22: The following output is created by the FREQUENCY procedure:

Which TABLES statement was used to completed the following program that produced the output?
proc freq data=sales;
<_insert_code_>
run;

Question23: The following SAS program is submitted:

What new value would be assigned to X if its original value was a missing value?

Question24: The following SAS DATA step is submitted:
libname temp 'SAS-data-library';
data temp.report;
set sasuser.houses;
newvar = price * 1.04;
run;
Which one of the following statements is true regarding the program above?

Question25: The following SAS program is submitted:
data one;
date = '04juI2005'd;
format date weekdate.; run;
proc print data = one; run;
What output is generated?

Question26: Consider the data step:

Which of the following assignment statements for variable group are functionally equivalent to the original statement used in the above data step?

Question27: The following SAS program is submitted:
data WORK.ACCOUNTING;
set WORK.DEPARTMENT;
label Jobcode='Job Description';
run;
Which statement is true about the output dataset?

Question28: Given the following raw data records:

The following output is desired:

Which SAS program correctly reads in the raw data?

Question29: Scenario:

The following code is submitted: data WORK.FINAL_EMPS; set WORK.EMPLOYEE WORK.NEW_EMPS; run; proc print data=WORK.FINAL_EMPS; title 'The RESULTS Data Set'; run; What is the resulting data set?

Question30: Given the following raw data records in DATAFILE.TXT:

Which output is correct based on the submitted program?

Question31: Which step sorts the observations of a permanent SAS data set by two variables and stores the sorted observations in a temporary SAS data set?

Question32: CORRECT TEXT
Given the SAS data set WORK.EMP_NAME:

Given the SAS data set WORK.EMP_DEPT:

The following program is submitted:

How many observations are in data set WORK.ALL after submitting the program?
Enter your numeric answer in the space below.

Question33: The following program is submitted:
proc contents data=_all_;
Which statement best describes the output from the submitted program?

Question34: The following SAS program is submitted, creating the SAS data set ONE:
data one;
infile 'file specification';
input num chars$;
run;
ONE
NUMCHAR
123
323
177
The following SAS program is submitted:
proc print data = one;
where char = 23;
run;
What is output?

Question35: The following SAS program is submitted:
libname temp 'SAS data library';
data work.new;
set temp.jobs;
format newdate mmddw10.;
mdate = month(newdate);
ddate = weekday(newdate);
run;
proc print data = work.new; run;
The variable NEWDATE contains the SAS date value for April 15. 2005.
What output is produced if April 15, 2005 falls on a Friday?

Question36: Which one of the following statements is true regarding the name of a SAS array?

Question37: The SAS data set WORK.ONE contains a numeric variable named Num ana character variable named Char:
WORK.ONE
Num Char
------ ------
1 23
3 23
1 77
The following SAS program is submitted:
proc print data=WORK.ONE;
where Num='1';
run;
What is output?

Question38: Scenario:
This project will use data setcert.input36. At any time, you may save your program asprogram36 in cert\programs. Write a SAS program that will clean the data incert.input36as follows:
Step 1:
create a temporary data set, cleandata36.
In this data set, convert all case.
Then keep only observations with group equal to 'A' or 'B'.
Step 2:
Determine the MEDIAN value for the Kilograms variable for each group(A,B) in the cleandata36 data set. Round MEDIAN to the nearest whole number.
Step 3:
* Create results.output36 from cleandata36
* Ensure that all values for variable Kilogramsare between 40 and 200, inclusively.
* If the value is missing or out of range, replace the value with the MEDIAN Kilograms value for the respectivegroup(A,B) calculated in step 2

Question39: The following SAS program is submitted:
data WORK.AUTHORS;
array Favorites{3} $ 8 ('Shakespeare','Hemingway','McCaffrey');
run;
What is the value of the second variable in the dataset WORK.AUTHORS?

Question40: The following SAS program is submitted:
data work.test;
array items{3} _temporary_;
run;
What are the names of the variable(s) in the WORKTEST data set?

Question41: This question will ask you to provide a missing format:
Given the contents of the raw data file 'EMPLOYEE.TXT'

Which SAS information correctly completes the program?

Question42: Given the SAS data set PRICES:
PRICES
prodid price
K12S5.10producttype
NETWORKsales
15returns
2
B132S 2.34HARDWARE30010
R18KY21.29SOFTWARE255
3KL8BY 6.37HARDWARE12515
DY65DW 5.60HARDWARE455
DGTY23 4.55HARDWARE672
The following SAS program is submitted:
data hware inter soft;
set prices (keep = producttype price);
if price le 5.00;
if producttype = 'HARDWARE' then output HWARE; else if producttype = 'NETWORK' then output INTER; else if producttype = 'SOFTWARE' then output SOFT; run; How many observations does the HWARE data set contain?

Question43: You're attempting to read a raw data file and you see the following messages displayed in the SAS Log:

What does it mean?

Question44: Which of the following SAS programs creates a variable named City with a value ofChicago?
Select one:

Question45: The contents of the raw data file FURNITURE are listed below:
--------10-------20-------30
chair,,table
chair,couch,table
The following SAS program is submitted:
data stock;
infile 'furniture' dsd;
input item1 $ item2 $ item3 $;
run;
Which one of the following is the value of the variable named ITEM2 in the first observation of the output data set?

Question46: After a SAS program is submitted, the following is written to the SAS log:

What changes should be made to the KEEP statement to correct the errors in the LOG?

Question47: Which program displays a listing of all data sets in the SASUSER library?

Question48: Given the following data step:

After data step execution, what will data set WORK.GEO contain?

Question49: The following SAS program is submitted:
data work.month;
date = input('13mar2000',date9.);
run;
Which one of the following represents the type and length of the variable DATE in the output data set?

Question50: Which one of the following SAS system options prevents the page number from appearing on a report?

Question51: CORRECT TEXT
The following SAS program is submitted:

How many observations are written to the WORK.VOLUME data set?
Enter your numeric answer in the space below.

Question52: The following SAS program is submitted:
data WORK.DATE_INFO;
X="01Jan1960" D;
run;
What variable X contains what value?

Question53: The following SAS program is submittad:
data work.sales;
do year = 1 to 5;
do month=1 to 12;
x+1;
output
end;
end;
run;
How many observations are written the WORK SALES data set?

Question54: Given the SAS data set WORK.P2000:

And the SAS data set WORK.P2008:

The following output is desired:

Which SAS program correctly combines the data?

Question55: The following SAS program is submitted:
data _null_;
set old (keep = prod sales1 sales2);
file 'file-specification';
put sales1 sales2;
run;
Which one of the following default delimiters separates the fields in the raw data file created?

Question56: Scenario:
Open the existing program, program44.sasfrom folder cert\errors. At any time, you may save your corrected program asprogram44incert\programs. This program is intended to:
O Create a new data set using thecert.input44set as input
O Drop variables:bp_status, weight_status, andsmoking _status.
* Create a new column,chol_status, based on the following values of cholesterol:
less than 200: "Safe"
200-239: "High - Borderline"
240 and higher: "High" oShould not calculatechol_statusfor missing cholesterol values There are multiple errors in the program.
These may be syntax errors, logic errors, or problems with the program structure.
Logic errors might not produce messages in the log, but will cause the program to produce results different than intended.
Correct the errors, run the program, and then use the results to answer the next 3 questions.
How many variables are in thework. outdata set? Enter your numeric answer in the space below:

Question57: The following SAS program is submitted:

How many observations are written to the WORK.SALES data set?

Question58: The following SAS program is submitted:
data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAS data set WORKPEOPLE has 5 observations, and the data set WORKMONEY has 7 observations.
How many observations will the data set WORK.EMPSALARY contain?

Question59: Which statement correctly computes the average of four numerical values?

Question60: The following SAS program is submitted:
libname company 'SAS-data-library';
proc sort data = company.payroll;
by EmployeeIDNumber;
run;
Write access has been granted to the COMPANY library.
Which one of the following represents how the observations are sorted?

Question61: The data set WORK.REALESTATE has the variable LocalFee with a format of 9. and a variable CountryFee with a format of 7.; The following SAS program is submitted:

What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?

Question62: Given the SAS data set PRICES:
PRICES
Prodid priceproducttypesalesreturns
K1255.10NETWORK152
B132S 2.34HARDWARE30010
R18KY2 1.29SOFTWARE255
3KL8BY 6.37HARDWARE12515
DY65DW 5.60HARDWARE455
DGTY23 4.55HARDWARE672
The following SAS program is submitted:
data hware inter cheap;
set prices(keep = productype price);
if producttype = 'HARDWARE' then output hware; else if producttype = 'NETWORK' then output inter; if price le 5.00; run; if producttype = 'HARDWARE' then output hware; else if producttype = 'NETWORK' then output inter; if price le 5.00; run; How many observations does the HWARE data set contain?

Question63: Which of the following choices is an unacceptable ODS destination for producing output that can be viewed in Microsoft Excel?

Question64: Which one of the following SAS DATA steps saves the temporary data set named MYDATA as a permanent data set?

Question65: The following SAS program is submitted:
data work.test;
array agents{4} $ 12 sales1 - sales4;
run;
Which one of the following represents the variables that are contained in the output data set?

Question66: Scenario:
This project will use data set cert.input13. At any time, you may
save your program as program13 in cert\programs.
This data set contains 1001 observations and 2 variables:
* Date1, a numeric variable representing an unformatted
SAS date value. Example: 12001.
* Charnum, a character variable representing a monetary
amount. Example: $50,000.
Write a SAS program that will:
* Save the new data set as results.output13.
* Create a new variable Chdate that converts
the datel variable to a character variable that is in the
format ddmonyyyy, such as 11NOV1992.
* Create a new variable num1 that converts
the Charnum variable to a numeric variable.
What is the value ofChdatefor observation 52?

Question67: This question will ask you to provide a line of missing code.
Given the following data set WORK.SALES:

The following program is submitted:

Which statement should be inserted to produce the following output?

Question68: Consider the following data step:

In filtering the values of the variable X in data set WORK.OLD, what value new value would be assigned to X if its original value was a missing value?

Question69: How many of the following SAS data set names are valid?

Question70: This question will ask you to provide a line of missing code.
The following SAS program is submitted:
proc freq data = WORK.SALES;
<insert code here>
run;
The following output is created by the FREQUENCY procedure:

Which statement was used to complete the above program that produced the output?

Question71: Given the raw data file EMPLOYEE:
----I----1 0---I----20---I----30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
infile 'employee';
input employee_name $ 1-4;
if employee_name = 'Ruth' then input idnum 10-11;
else input age 7-8;
run;
What value does the variable IDNUM contain when the name of the employee is "Ruth"?

Question72: The Excel workbook QTR1.XLS contains the following three worksheets:
JAN
FEB
MAR
Which statement correctly assigns a library reference to the Excel workbook?

Question73: The following SAS program is submitted:
Data_null_;
set old;
put sales 1 sales2;
run;
Where is the output written?

Question74: The following SAS program is submitted:

How many raw data records are read during each iteration of the DATA step?

Question75: Given the SAS data set WORKAWARDS:
WORK.AWARDS
FNAMEPOINTSMONTH
----------------------------------
Amy24
Amy17
Gerard33
Wang33
Wang112
Wang18
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
How are the observations sorted?

Question76: The following SAS program is submitted:

What is the result?

Question77: By default, which variables and data values are used to calculate statistics in the MEANS procedure?

Question78: The contents of the raw data file AMOUNT are listed below:
--------10-------20-------30
$1,234
The following SAS program is submitted:
data test;
infile 'amount';
input @1 salary 6.;
if _error_ then description = 'Problems';
else description = 'No Problems';
run;
Which one of the following is the value of the DESCRIPTION variable?

Question79: A user-defined format has been created using the FORMAT procedure. Where is it stored?

Question80: The following SAS program is submitted:

Which statement is true about the output data set?

Question81: The data set WORK.REALESTATE has the variable LocalFee with a format of 9. and a variable CountryFee with a format of 7.; The following SAS program is submitted:

What are the formats of the variables LocalFee and CountryFee in the output data set?

Question82: The following SAS program is submitted:
proc sort data = sasuser.houses out = houses;
by style;
run;
proc print data = houses;
run;
Click on the Exhibit button to view the report produced.
style bedrooms baths price
CONDO 2 1.5 80050
3 2.5 79350
4 2.5 127150
2 2.0 110700
RANCH 2 1.0 64000
3 3.0 86650
3 1.0 89100
1 1.0 34550
SPLIT 1 1.0 65850
4 3.0 94450
3 1.5 73650
TWOSTORY 4 3.0 107250
2 1.0 55850
2 1.0 69250
4 2.5 102950
Which of the following SAS statement(s) create(s) the report?

Question83: A raw data file is listed below:
RANCH,1250,2,1,Sheppard Avenue,"$64,000"
SPLIT,1190,1,1,Rand Street,"$65,850"
CONDO,1400,2,1.5,Market Street,"80,050"
TWOSTORY,1810,4,3,Garris Street,"$107,250"
RANCH,1500,3,3,Kemble Avenue,"$86,650"
SPLIT,1615,4,3,West Drive,"94,450"
SPLIT,1305,3,1.5,Graham Avenue,"$73,650"
The following SAS program is submitted using the raw data file as input:
data work.condo_ranch;
infile 'file-specification' dsd;
input style $ @;
if style = 'CONDO' or style = 'RANCH' then input sqfeet bedrooms baths street $ price : dollar10.; run; How many observations does the WORK.CONDO_RANCH data set contain?

Question84: The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department
then payroll = 0;
payroll + wagerate;
if last.department
run;
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for each of 5 departments.
What is the result?

Question85: Given the SAS data set ONE:
Given the SAS data set WORK.ONE:

The following SAS program is submitted:

Which report is produced?

Question86: Given the contents of the raw data file TYPECOLOR:
----I----10---I----20---I----30
Daisyyellow
The following SAS program is submitted:
data flowers;
infile 'typecolor';
input type$ 1-5+1 color$;
run;
What are the values of the variables TYPE and COLOR?

Question87: Scenario:
This project will use data set cert.input13. At any time, you may
save your program as program13 in cert\programs.
This data set contains 1001 observations and 2 variables:
* Date1, a numeric variable representing an unformatted
SAS date value. Example: 12001.
* Charnum, a character variable representing a monetary
amount. Example: $50,000.
Write a SAS program that will:
* Save the new data set as results.output13.
* Create a new variable Chdate that converts
the datel variable to a character variable that is in the
format ddmonyyyy, such as 11NOV1992.
* Create a new variable num1 that converts
the Charnum variable to a numeric variable.
What is the average (mean) of the num1 variable for the entire data set?
Enter your numeric answer in the space below (Round your answer to the nearest integer).

Question88: The following SAS program is submitted:
data WORK.ONE;
Text='Australia, US, Denmark';
Pos=find (Text,'US','i',5);
run;
What value will SAS assign to Pos?

Question89: The following SAS program is submitted:
<_insert_ods_code_>
proc means data=SASUSER.SHOES;
where Product in ('Sandal' , 'Slipper' , 'Boot');
run;
<_insert_ods_code_>
Which ODS statements inserted, respectively, in the two location above creates a report stored in an html file?

Question90: Which one of the following is true when SAS encounters a data error in a DATA step?

Question91: The following SAS program is submitted:
data WORK.OUTDS;
do until(Prod GT 6);
Prod + 1;
end;
run;
What is the value of the variable Prod in the output data set?

Question92: A raw data record is listed below:
--------10-------20-------30
1999/10/25
The following SAS program is submitted:
data projectduration;
infile 'file-specification';
input date $ 1 - 10;
run;
Which one of the following statements completes the program above and computes the duration of the project in days as of today's date?

Question93: Given the SAS data set QTR 1_REVENUE:
destination revenue
YYZ53634
FRA62129
FRA75962
RDU76254
YYZ82174
The following SAS program is submitted:
proc sort data = qtr1_revenue;
by destination descending revenue; run;
What is the first observation in the output data set?

Question94: Given the following raw data records in TEXTFILE.TXT:

The following output is desired:

Which SAS program correctly produces the desired output?

Question95: The following SAS program is submitted:

The SAS data set WORK.SALARY is currently ordered by Gender within Department.
Which inserted code will accumulate subtotals for each Gender within Department?

Question96: The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below:
WORK.EMPLOYEE WORK.SALARY
fname age fname salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;
merge work.employee
work.salary;
by fname;
totsal + salary;
run;
How many variables are output to the WORK.EMPDATA data set?

Question97: The following output is created by the FREQUENCY procedure:

Which TABLES option(s) would be used to eliminate the row and column counts and just see the frequencies and percents?

Question98: The following SAS program is submitted:
proc print data = sasuser.houses;
run;
proc means data = sasuser.shoes;
run;
Which one of the following OPTIONS statements resets the page number to 1 for the second report?

Question99: A SAS program is submitted and the following SAS log is produced:
2 data gt100;
3 set ia.airplanes
4 if mpg gt 100 then output;
22 202
ERROR: File WORK.IF.DATA does not exist.
ERROR: File WORK.MPG.DATA does not exist.
ERROR: File WORK.GT.DATA does not exist.
ERROR: File WORK.THEN.DATA does not exist.
ERROR: File WORK.OUTPUT.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name,
a quoted string, (, ;, END, KEY, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
5 run;
The IA libref was previously assigned in this SAS session.
Which one of the following corrects the errors in the LOG?

Question100: The following code was modified to generate the results further below:
proc format;
value agegrp
low-12 ='Pre-Teen'
13-high = 'Teen';
run;
proc means data=SASHELP.CLASS;
var Height;
class Sex Age;
format Age agegrp.;
run;
The following results were generated to display only specific statistics and limit the decimals with the modification:

Which statement below was modified or added to generate the results above:

Question101: The following program is submitted:
proc contents data=_all_;
run;
Which statement best describes the output from the submitted program?

Question102: Given the SAS data set PEPM.STUDENTS:
PERM.STUDENTS
NAME AGE
Alfred 14
Alice13
Barbara13
Carol14
The following SAS program is submitted:
libname perm 'SAS data library';
data students;
set perm. Students;
file 'file specification';
put name $15. @5 age 2.;
run;
What is written to the output raw data file?

Question103: A user-defined format has been created using the FORMAT procedure.
How is it stored?

Question104: The following SAS program is submitted:
data WORK.ACCOUNTING;
set WORK.DEPARTMENT;
length EmpId $6;
CharEmpid=EmpId;
run;
If data set WORK.DEPARTMENT has a numeric variable EmpId.
Which statement is true about the output dataset?

Question105: Given the SAS data set WORK.PRODUCTS:

How many variables does the WORK.REVENUE data set contain?

Question106: The following SAS DATA step executes on Monday, April 25, 2000:
data newstaff;
set staff;
start_date = today();
run;
Which one of the following is the value of the variable START_DATE in the output data set?

Question107: The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently ordered byDepartment The following SAS program is submitted:
data WORK.TOTAL;
set WORK.SALARY(keep=Department MonthlyWageRate);
by Department;
if First.Department=1 then Payroll=0;
Payroll+(MonthlyWageRate*12);
if Last.Department=1; run;
Which statement is true? Select one:

Question108: Assume that Sasuser.One does not exist and that the following SAS program is submitted at the beginning of a new SAS session:
data sasuser.one;
x=1;
y=27;
output one; run;
Select one:

Question109: The following SAS program is submitted:
data work.test;
Title = 'A Tale of Two Cities, Charles J. Dickens';
Word = scan(title,3,' ,');
run;
Which one of the following is the value of the variable WORD in the output data set?

Question110: The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country = City!!', '!!'England';
run;
Which one of the following is the value of the variable CITY_COUNTRY in the output data set?

Question111: Given the SAS data set WORK.EMP_NAME:

Given the SAS data set WORK.EMP_DEPT:

The following program is submitted:

How many observations are in data set WORK.ALL after submitting the program?

Question112: The following SAS program is submitted:
options pageno = 1;
proc print data = sasuser.houses;
run;
proc means data = sasuser.shoes;
run;
The report created by the PRINT procedure step generates 5 pages of output.
What is the page number on the first page of the report generated by the MEANS procedure step?

Question113: Given the AIRPLANES data set
AlRPLANES
TYPE MPG
-------- ------
F-18 105
C-130 25
Harrier 75
A-6 110
The following SAS program is submitted:
data gt100;
set airplanes(keep = type mpg load);
load = mpg * 150;
run;
The program fails to execute due to syntax errors.
What is the cause of the syntax error?

Question114: Which one of the following SAS procedures displays the data portion of a SAS data set?

Question115: The following SAS program is submitted:
libname rawdata1 'location of SAS data library';
filename rawdata2 'location of raw data file';
data work.testdata;
infile
input sales1 sales2;
run;
Which one of the following is needed to complete the program correctly?

Question116: The following SAS program is submitted:
data test;
infile 'file specification';
input name $ amount@@;
run;
Which of the following is true?

Question117: The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently ordered by Department. The following SAS program is submitted:

Which statement is true?

Question118: Assume thatWork.Ds1andWork.Ds2exist and the following SAS program is submitted:

How many PDF files are created? Select one:

Question119: Which one of the following is true of the SUM statement in a SAS DATA step program?

Question120: The SAS data set WORK.AWARDS is listed below:
fname points
Amy 2
Amy 1
Gerard 3
Wang 3
Wang 1
Wang 2
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
Which one of the following represents how the observations are sorted?

Question121: The contents of the raw data file TEAM are listed below:
--------10-------20-------30
Janice 10
Henri 11
Michael 11
Susan 12
The following SAS program is submitted:
data group;
infile 'team';
input name $15. age 2.;
file 'file-specification';
put name $15. +5 age 2.;
run;
Which one of the following describes the output created?

Question122: The contents of the raw data file EMPLOYEE are listed below:
--------10-------20-------30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
infile 'employee';
input employee_name $ 1-4;
if employee_name = 'Sue' then input age 7-8; else input idnum 10-11;
run;
Which one of the following values does the variable AGE contain when the name of the employee is "Sue"?

Question123: The following SAS program is submitted:
data work.accounting;
set work.dept1 work.dept2;
jobcode = 'FA1';
length jobcode $ 8;
run;
A character variable named JOBCODE is contained in both the WORK.DEPT1 and WORK.DEPT2 SAS data sets. The variable JOBCODE has a length of 5 in the WORK.DEPT1 data set and a length of 7 in the WORK.DEPT2 data set.
What is the length of the variable JOBCODE in the output data set?

Question124: The following SAS program is submitted:
data work.one;
x = 3;
y = 2;
z = x ** y;
run;
Which one of the following is the value of the variable Z in the output data set?

Question125: Scenario:
This project will use data set cert.input27. At any time, you may
save your program as program27 in cert\programs. You will use
this program in the next project.
Write a SAS program that will:
* Create output data set results.output27a as a subset
of cert.input27 where the country variable's value is
"US" (any variation of case, such as US or us).
* Sort results.output27a:
" first by the variable state in ascending order
" then by Postal_Code in descending order
" and finally by employee_ID in ascending order.
Run the program and use the results to answer the question below.
What is the value of Employee_ID for observation 100 in results.output27a?

Question126: Given the following code:
proc print data=SASHELP.CLASS(firstobs=5 obs=15);
where Sex='M';
run;
How many observations will be displayed?

Question127: The data set RALESTATE has the variable LOCALFEE with a format or 9. and a variable COUNTRYFEE with a format or 7.; The following SAS program is submitted:
data history;
format local fee country fee percent6.;
set realestate;
local fee = local fee / 100;
country fee = country fee / 100;
run;
What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?

Question128: The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City_Country = substr(First,1,7)!!', '!!'England';
run;
Which one of the following is the length of the variable CITY_COUNTRY in the output data set?

Question129: Which step displays a listing of all the data sets in the WORK library?

Question130: Given the contents of the raw data file 'EMPLOYEE.TXT'

Which SAS informat correctly completes the program?

Question131: The observations in the SAS data set WORK.TEST are ordered by the values of the variable SALARY. The following SAS program is submitted:
proc sort data = work.test out = work.testsorted;
by name;
run;
Which one of the following is the result of the SAS program?

Question132: Given the raw data record in the file phone.txt:

Which SAS statement completes the program and results in a value of "James Stevens" for the variableFullName?

Question133: The following SAS program is submitted:
data revenue;
set year_1;
var1 = mdy(1,15,1960);
run;
Which one of the following values does the variable named VAR1 contain?

Question134: The following SAS program is submitted:
proc means data = sasuser.houses std mean max;
var sqfeet;
run;
Which one of the following is needed to display the standard deviation with only two decimal places?

Question135: Consider the following data step:
data WORK.NEW;
set WORK.OLD;
Count+1;
run;
The varaible Count is created using a sum statement.
Which statement regarding this variable is true?

Question136: The following SAS program is submitted:
proc means data=work.schools median;
<insert statement(s) here>
run;
Assume thatWork.Schoolshas two numeric variables and the following PROC MEANS report is produced:

Which of the following SAS statements completes the program and creates the desired report? Select one:

Question137: Variable Name would have a format of $CHAR15. in the new data set Work. Both. The LENGTH statement only gives the variable Name a predefined maximum length. The correct answer is: $CHAR15 Given the SAS data set WORK.ONE:
X Y Z
- - --
1 A 27
1 A 33
1 B 45
2 A 52
2 B 69
3 B 70
4 A 82
4 C 91
The following SAS program is submitted:
data WORK.TWO;
set WORK.ONE;
by X Y;
if First.Y; run; proc print data=WORK.TWO noobs;
run;
Which report is produced?
Select one:

Question138: Given the following SAS log entry:

What caused the error?

Question139: After a SAS program is submitted, the following is written to the SAS log:
105 data WORK.JANUARY;
106 set WORK.ALLYEAR(keep=Product Month Quantity Cost);
107 if Month='JAN' then output WORK.JANUARY;
108 Sales=Cost * Quantity;
109 drop=Month Quantity Cost;
-----
22
ERROR 22-322: Syntax error, expecting one of the following: !,
!!, , *, **, +, -,
, <=, <>, =, >, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR, ^=, |, ||, ~=.
110 run;
What data set option could be attached to WORK.JANUARY to replace the DROP statement that generated the error in the log?

Question140: Given the SAS data set WORK.ONE:

The following SAS program is submitted:

The data set WORK.TWO is created, where Day would be 1 for Sunday, 2 for Monday, 3 for Tuesday, ... :

Which expression successfully completed the program and creates the variable DAY?

Question141: The following SAS program is submitted:

What are the values for x and y in the output data set?
Select one:

Question142: Scenario:
This project will use data setcert.input04. At any time, you may save your program asprogram04incert\programs. Write a SAS program that will create the data setresults.output04.
In this program, complete the following mathematical actions, in the following order:
* Round VAR1 and VAR2 to the nearest integer values.
* Multiply the rounded VAR1b y the rounded VAR2 and assign the new value to VAR3.
* Add VAR12 through VAR19 (8 variables) together, ignoring missing values. Assign the sum to VAR20.
For observation 16, what is the value ofVAR20? Enter your numeric answer in the space below.
Round your answer to the nearest whole number. Save your program asprogram04.sasincert\programs before continuing with the next project

Question143: The following SAS program is submitted:
data work.pieces;
do while (n lt 6);
n + 1;
end;
run;
Which one of the following is the value of the variable N in the output data set?